package com.fuxian.dao;

import java.sql.Timestamp;
import java.util.List;


import com.fuxian.model.News;

public interface NewsDao {

	/**
	 * ADD NEW NEWS
	 * @author caoxue
	 * @param news
	 */
	public void addNews(News news);

	/**
	 * DELETE NEWS BY ID
	 * @author caoxue
	 * @param id
	 */
	public void deleteNewsById(int id);

	/**
	 * MODIFY NEWS
	 * @author caoxue
	 * @param news
	 */
	public void modifyNews(News news);

	/**
	 * SELECT NEWS BY ID
	 * @author caoxue
	 * @param id
	 * @return News
	 */
	public News selectNewsById(int id);

	/**
	 * SELECT NEWS BY Author
	 * @author caoxue
	 * @param author
	 * @param start
	 * @param size
	 * @return List
	 */
	public List<News> selectNewsByAuthor(String author,int start,int size);

	/**
	 * SELECT NEWS BY Createtime
	 * @author caoxue
	 * @param Createtime
	 * @return List
	 */
	public List<News> selectNewsByCreatetime(Timestamp createTime,int start,int size);

	
	/**
	 * SELECT ALL NEWS
	 * @return List
	 */
	public List<News> selectAllNews(int start,int size);
	
	
	public int selectCount();
}
